import "./assets/main.scss";
import "./assets/element.scss";

import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import { initMicroApp } from "ouroboros-sdk";

import ElementPlus from "element-plus";

initMicroApp({
  render: (props) => {
    console.log("props", props);
    const app = createApp(App, { getProps: () => props });
    app.provide("onConfirm", props?.onConfirm);
    app.provide("onClose", props?.onClose);
    app.use(router);
    app.use(ElementPlus);
    app.mount("#app");
    return app;
  },
});

export * from "ouroboros-sdk/lifecycle";
